
import java.util.ArrayList;
import java.util.List;
public class TestDeepPrototype {

    public static void main(String[] args) throws CloneNotSupportedException {

        DeepPrototype deepPrototype = new DeepPrototype();

        deepPrototype.setAge(18);
        deepPrototype.setName("张三");
        List<String> list = new ArrayList<>();
        list.add("11111111");
        deepPrototype.setPhoneList(list);

        DeepPrototype cloneDeepPrototype = (DeepPrototype)deepPrototype.clone();
        System.out.println(deepPrototype.getPhoneList());
        System.out.println(cloneDeepPrototype.getPhoneList());

        System.out.println(deepPrototype.getPhoneList() == cloneDeepPrototype.getPhoneList());



    }
}